<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .div1 {
            width: 400px;
            height: 200px;
            background: blue;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .div1>div:first-child {
            width: 50px;
            height: 50px;
            background: orange;
        }

        .div1>div:last-child {
            width: 50px;
            height: 50px;
            background: orange;
        }

        .div1>div:nth-child(2) {
            width: 50px;
            height: 50px;
            background: purple;
        }

        .div1>div:nth-child(3) {
            width: 50px;
            height: 50px;
            background: purple;
        }
    </style>
</head>

<body>
    <p>思考下怎么实现这种布局</p>
    <div class="div1">
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </div>
</body>

</html>